home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / man / cat3 / MrmOpenHierarchyPerDisplay.z / MrmOpenHierarchyPerDisplay
Encoding:
Text File  |  2003-11-18  |  11.4 KB  |  265 lines

  1.  
  2.  
  3.  
  4.      MMMMrrrrmmmmOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeMMMMmmmmrrrrmmmmVVVVOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y - Allocates a hierarchy ID    and
  10.       opens    all the    UID files in the hierarchy
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       #include <Mrm/MrmPublic.h>
  14.  
  15.       Cardinal MrmOpenHierarchyPerDisplay (ddddiiiissssppppllllaaaayyyy,,,,    nnnnuuuummmm____ffffiiiilllleeeessss,,,, ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt,,,,
  16.       aaaannnncccciiiillllllllaaaarrrryyyy____ssssttttrrrruuuuccccttttuuuurrrreeeessss____lllliiiisssstttt,,,, hhhhiiiieeeerrrraaaarrrrcccchhhhyyyy____iiiidddd)
  17.            _D_i_s_p_l_a_y        *ddddiiiissssppppllllaaaayyyy;
  18.            _M_r_m_C_o_u_n_t        nnnnuuuummmm____ffffiiiilllleeeessss;
  19.            _S_t_r_i_n_g        ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt[];
  20.            _M_r_m_O_s_O_p_e_n_P_a_r_a_m_P_t_r*aaaannnncccciiiillllllllaaaarrrryyyy____ssssttttrrrruuuuccccttttuuuurrrreeeessss____lllliiiisssstttt;
  21.            _M_r_m_H_i_e_r_a_r_c_h_y    *hhhhiiiieeeerrrraaaarrrrcccchhhhyyyy____iiiidddd;
  22.  
  23.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.       _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y allows you    to specify the list of
  25.       UID files that MRM searches in subsequent fetch operations.
  26.       All subsequent fetch operations return the first occurrence
  27.       of the named item encountered    while traversing the UID
  28.       hierarchy from the first list    element    (UID file
  29.       specification) to the    last list element.  This function also
  30.       allocates a hierarchy    ID and opens all the UID files in the
  31.       hierarchy.  It initializes the optimized search lists    in the
  32.       hierarchy.  If _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y encounters any
  33.       errors during    its execution, any files that were opened are
  34.       closed.
  35.  
  36.       The application must call _X_t_A_p_p_I_n_i_t_i_a_l_i_z_e before calling
  37.       _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y.
  38.  
  39.       ddddiiiissssppppllllaaaayyyy
  40.            Specifies the connection    to the X server    and the    value
  41.            to pass to _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e.  For more information on
  42.            the Display structure, see the Xlib function
  43.            _X_O_p_e_n_D_i_s_p_l_a_y.
  44.  
  45.       nnnnuuuummmm____ffffiiiilllleeeessss
  46.            Specifies the number of files in    the name list.
  47.  
  48.       ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt
  49.            Specifies an array of character strings that identify
  50.            the UID files.
  51.  
  52.       aaaannnncccciiiillllllllaaaarrrryyyy____ssssttttrrrruuuuccccttttuuuurrrreeeessss____lllliiiisssstttt
  53.            A list of operating-system-dependent ancillary
  54.            structures corresponding    to such    things as filenames,
  55.            clobber flag, and so forth.  This argument should be
  56.            NULL for    most operations.  If you need to reference
  57.            this structure, see the definition of _M_r_m_O_s_O_p_e_n_P_a_r_a_m_P_t_r
  58.            in _M_r_m_P_u_b_l_i_c._h for more information.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 11/11/03)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      MMMMrrrrmmmmOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeMMMMmmmmrrrrmmmmVVVVOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((3333XXXX))))
  71.  
  72.  
  73.  
  74.       hhhhiiiieeeerrrraaaarrrrcccchhhhyyyy____iiiidddd
  75.            Returns the search hierarchy ID.     The search hierarchy
  76.            ID identifies the list of UID files that    MRM searches
  77.            (in order) when performing subsequent fetch calls.
  78.  
  79.       Each UID file    string in ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt can specify either a
  80.       full pathname    or a filename.    If a UID file string has a
  81.       leading slash    (/), it    specifies a full pathname, and MRM
  82.       opens    the file as specified.    Otherwise, the UID file    string
  83.       specifies a filename.     In this case MRM looks    for the    file
  84.       along    a search path specified    by the _U_I_D_P_A_T_H environment
  85.       variable or by a default search path,    which varies depending
  86.       on whether or    not the    _X_A_P_P_L_R_E_S_D_I_R environment    variable is
  87.       set.
  88.  
  89.       The _U_I_D_P_A_T_H environment variable specifies a search path and
  90.       naming conventions associated    with UID files.     It can
  91.       contain the substitution field %U, where the UID file    string
  92.       from the ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt argument to
  93.       _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y is    substituted for    %U.  It    can
  94.       also contain the substitution    fields accepted    by
  95.       _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e.  The substitution field %T    is always
  96.       mapped to _u_i_d.  The entire path is first searched with %S
  97.       mapped to ._u_i_d and then, if no file is found,    is searched
  98.       again    with %S    mapped to NULL.     For example, the following
  99.       _U_I_D_P_A_T_H value    and _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y call cause MRM
  100.       to open two separate UID files:
  101.       UIDPATH=/uidlib/%L/%U.uid:/uidlib/%U/%L
  102.         static char    *uid_files[] = {"/usr/users/me/test.uid",
  103.       "test2"};
  104.         MrmHierarchy  *Hierarchy_id;
  105.         MrmOpenHierarchyPerDisplay((MrmCount)2,uid_files, NULL,
  106.       Hierarchy_id)
  107.  
  108.       MRM opens the    first file, /_u_s_r/_u_s_e_r_s/_m_e/_t_e_s_t._u_i_d, as
  109.       specified in the ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt argument to
  110.       _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y, because the UID file string in
  111.       the ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt argument specifies a full    pathname.  MRM
  112.       looks    for the    second file, _t_e_s_t_2, first as
  113.       /_u_i_d_l_i_b/%_L/_t_e_s_t_2._u_i_d and second as /_u_i_d_l_i_b/_t_e_s_t_2/%_L, where
  114.       the display's    language string    is substituted for %L.
  115.  
  116.       After    _M_r_m_O_p_e_n_H_i_e_r_a_r_c_h_y_P_e_r_D_i_s_p_l_a_y opens the UID hierarchy,
  117.       you should not delete    or modify the UID files    until you
  118.       close    the UID    hierarchy by calling _M_r_m_C_l_o_s_e_H_i_e_r_a_r_c_h_y.
  119.  
  120.       If _U_I_D_P_A_T_H is    not set    but the    environment variable
  121.       _X_A_P_P_L_R_E_S_D_I_R is set, MRM searches the following pathnames:
  122.             23:00:06S
  123.             $XAPPLRESDIR/%L/uid/%N/23:00:06S
  124.             $XAPPLRESDIR/%l/uid/%N/23:00:06S
  125.             $XAPPLRESDIR/uid/%N/23:00:06S
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 11/11/03)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      MMMMrrrrmmmmOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeMMMMmmmmrrrrmmmmVVVVOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((3333XXXX))))
  137.  
  138.  
  139.  
  140.             $XAPPLRESDIR/%L/uid/23:00:06S
  141.             $XAPPLRESDIR/%l/uid/23:00:06S
  142.             $XAPPLRESDIR/uid/23:00:06S
  143.             $HOME/uid/23:00:06S
  144.             $HOME/23:00:06S
  145.             /usr/lib/X11/%L/uid/%N/23:00:06S
  146.             /usr/lib/X11/%l/uid/%N/23:00:06S
  147.             /usr/lib/X11/uid/%N/23:00:06S
  148.             /usr/lib/X11/%L/uid/23:00:06S
  149.             /usr/lib/X11/%l/uid/23:00:06S
  150.             /usr/lib/X11/uid/23:00:06S
  151.             /usr/include/X11/uid/23:00:06S
  152.  
  153.       If neither _U_I_D_P_A_T_H nor _X_A_P_P_L_R_E_S_D_I_R is    set, MRM searches the
  154.       following pathnames:
  155.             23:00:06S
  156.             $HOME/%L/uid/%N/23:00:06S
  157.             $HOME/%l/uid/%N/23:00:06S
  158.             $HOME/uid/%N/23:00:06S
  159.             $HOME/%L/uid/23:00:06S
  160.             $HOME/%l/uid/23:00:06S
  161.             $HOME/uid/23:00:06S
  162.             $HOME/23:00:06S
  163.             /usr/lib/X11/%L/uid/%N/23:00:06S
  164.             /usr/lib/X11/%l/uid/%N/23:00:06S
  165.             /usr/lib/X11/uid/%N/23:00:06S
  166.             /usr/lib/X11/%L/uid/23:00:06S
  167.             /usr/lib/X11/%l/uid/23:00:06S
  168.             /usr/lib/X11/uid/23:00:06S
  169.             /usr/include/X11/uid/23:00:06S
  170.  
  171.       These    paths are defaults that    vendors    may change.  For
  172.       example, a vendor may    use different directories for
  173.       /_u_s_r/_l_i_b/_X_1_1 and /_u_s_r/_i_n_c_l_u_d_e/_X_1_1.
  174.  
  175.       The following    substitutions are used in these    paths:
  176.  
  177.       %_U   The UID file string, from the ffffiiiilllleeee____nnnnaaaammmmeeeessss____lllliiiisssstttt argument.
  178.  
  179.       %_N   The class name of the application.
  180.  
  181.       %_L   The display's language string.
  182.  
  183.       %_l   The language component of the display's language
  184.            string.
  185.  
  186.       %_S   The suffix to the file name.  The entire    path is
  187.            searched    first with a suffix of ._u_i_l, and if no file is
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 11/11/03)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      MMMMrrrrmmmmOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeMMMMmmmmrrrrmmmmVVVVOOOOppppeeeennnnHHHHiiiieeeerrrraaaarrrrcccchhhhyyyyPPPPeeeerrrrDDDDiiiissssppppllllaaaayyyy((((3333XXXX))))
  203.  
  204.  
  205.  
  206.            found, it is searched again with    a NULL suffix.
  207.  
  208.      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  209.       This function    returns    one of these status return constants:
  210.  
  211.       _M_r_m_S_U_C_C_E_S_S
  212.            The function executed successfully.
  213.  
  214.       _M_r_m_N_O_T__F_O_U_N_D
  215.            File not    found.
  216.  
  217.       _M_r_m_F_A_I_L_U_R_E
  218.            The function failed.
  219.  
  220.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  221.       _M_r_m_C_l_o_s_e_H_i_e_r_a_r_c_h_y(_3_X).
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 11/11/03)
  262.  
  263.  
  264.  
  265.